package com.js.admin.service.impl;

import com.js.admin.entity.BaseUser;
import com.js.admin.mapper.BaseUserMapper;
import com.js.admin.service.BaseUserService;
import com.js.common.service.impl.BizServiceImpl;
import com.js.common.util.BooleanUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author： ygl
 * @date： 2018/10/29
 * @Description：
 */
@Service
public class BaseUserServiceImpl extends BizServiceImpl<BaseUser> implements BaseUserService {

    @Autowired
    private BaseUserMapper baseUserMapper;

    @Override
    public BaseUser getUserByUsername(String username) {
        BaseUser baseUser = new BaseUser();
        baseUser.setUsername(username);
        baseUser.setIsDeleted(BooleanUtil.BOOLEAN_FALSE);
        baseUser.setIsDisabled(BooleanUtil.BOOLEAN_FALSE);
        return baseUserMapper.selectOne(baseUser);
    }
}
